﻿using System;

namespace Sustainalytics.ESGRatings.Service.Models
{
    /// <summary>
    /// Company monthly score.
    /// </summary>
    public class EsgCorporateMonthlyScoreDto
    {
        /// <summary>
        /// Company monthly ESG score.
        /// </summary>
        public Nullable<decimal> Score { get; set; }

        /// <summary>
        /// Month.
        /// </summary>
        public int Month { get; set; }

        /// <summary>
        /// Year.
        /// </summary>
        public int Year { get; set; }

        /// <summary>
        /// Date relevant for obtaining the month.
        /// </summary>
        public DateTime Date
        {
            get
            {
                return new DateTime(this.Year, this.Month, 1);
            }
            set
            {
                this.Month = value.Month;
                this.Year = value.Year;
            }
        }
    }
}
